package com.example.blog.repository;

import com.example.blog.entity.ContentAudit;
import com.example.blog.entity.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface ContentAuditRepository extends JpaRepository<ContentAudit, Long> {
    Page<ContentAudit> findByStatus(String status, Pageable pageable);
    Page<ContentAudit> findBySubmitter(User submitter, Pageable pageable);
    Page<ContentAudit> findByAuditor(User auditor, Pageable pageable);
    Page<ContentAudit> findByTypeAndContentId(String type, Long contentId, Pageable pageable);
    boolean existsByTypeAndContentIdAndStatusNot(String type, Long contentId, String status);
} 